import upload from '@/utils/upload'
import request from '@/utils/request'

// 查询用户个人信息
export function getUserProfile() {
	return request({
		url: '/product/sort/list?pageNum=1&pageSize=10000000',
		method: 'get'
	})
}
//轮播和详情图
export function getProductLunbo() {
	return request({
		url: '/product/images/list?pageNum=1&pageSize=10000000',
		method: 'get'
	})
}
//商品详情
export function getProductDetail(id) {
	return request({
		url: `/product/product/${id}`,
		method: 'get'
	})
}
//商品列表
export function getProductList() {
	return request({
		url: `/product/product/list?pageNum=1&pageSize=10000000`,
		method: 'get'
	})
}
export function getProductListAll(tid) {
	return request({
		url: '/product/product/list/productAll/'+tid,
		method: 'get'
	})
}
  //店铺商品
  export function getShopProductList(shopsId) {
	  return request({
		  url: `/product/product/getShopProduct/${shopsId}`,
		  method: 'get'
	  })
  }
//店铺商品
	  export function getShopProduct(shopsId) {
		  return request({
			  url: `/product/product/getShopProduct/${shopsId}`,
			  method: 'get'
		  })
	  }

//添加店铺商品
export function addShopProduct(product) {
	return request({
		url: `/product/product/add`,
		data: product,
		method: 'post'
	})
}
	  export function getParaValue() {
		  return request({
			  url: `/product/value/list?pageNum=1&pageSize=10000000`,
			  method: 'get'
		  })
	  }

	  export function getParaName() {
		  return request({
			  url: `/product/parameter/list?pageNum=1&pageSize=10000000`,
			  method: 'get'
		  })
	  }
// 删除商品信息
export function deleteProduct(ids) {
	return request({
		url: `/product/product/${ids}`,
		method: 'delete'
	})
}
